<template>
  <layout>
    <el-form label-width="100px">
      <el-form-item label="分类名称">
        <el-input  v-model="form.name"></el-input>
      </el-form-item>
      <el-form-item >
        <el-button @click='save'>保存</el-button>
      </el-form-item>
    </el-form>
    
  </layout>
</template>

<script>
export default {
  data() {
    return {
      form:{
        name:'',
      }
    }
  },
  methods: {
    save(){
      this.$http.post('/cate/insert',this.form).then(res =>{
        if(res.errcode ==0){
          //返回上一页
          this.$router.back()
        }
      })
    }
  },
}
</script>

<style >
  
</style>